heatMapPlot <-function(inputMatrix,fileName,xlab="",ylab="",title="",directory="./",width=1024,height=1024,cleanColNames=FALSE,cleanRowNames=FALSE){

fname <- paste(directory,"/",fileName,".png",sep="")
matrixMin <-min(inputMatrix)
matrixMax <-max(inputMatrix)
if(cleanColNames){
	colnames(inputMatrix) <-NULL
}
if(cleanRowNames){
	rownames(inputMatrix) <-NULL
}
heatSeq <-seq(from=matrixMin,to=matrixMax,length.out=10)
print(heatSeq)
pal <- colorRampPalette(c("black", "white"), space = "rgb")
lp <-levelplot(inputMatrix, main=title, xlab=xlab, ylab=ylab, col.regions=pal(length(heatSeq)),
		 cuts=3, at=heatSeq)
png(filename=fname, height=width, width=height,bg="white")
	plot(lp)
dev.off()
}